<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>CellRangeAddressList (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="CellRangeAddressList (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellRangeAddressList.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressBase.html" title="class in org.apache.poi.ss.util"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/ss/util/CellReference.html" title="class in org.apache.poi.ss.util"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/ss/util/CellRangeAddressList.html" target="_top">FRAMES</a></li>
<li><a href="CellRangeAddressList.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.ss.util</p>
<h2 title="Class CellRangeAddressList" class="title">Class CellRangeAddressList</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.ss.util.CellRangeAddressList</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/poi/hssf/util/CellRangeAddressList.html" title="class in org.apache.poi.hssf.util">CellRangeAddressList</a></dd>
</dl>
<hr>
<br>
<pre>public class <strong>CellRangeAddressList</strong>
extends java.lang.Object</pre>
<div class="block">Implementation of the cell range address lists,like is described
 in OpenOffice.org's Excel Documentation: excelfileformat.pdf sec 2.5.14 -
 'Cell Range Address List'
 
 In BIFF8 there is a common way to store absolute cell range address lists in
 several records (not formulas). A cell range address list consists of a field
 with the number of ranges and the list of the range addresses. Each cell
 range address (called an ADDR structure) contains 4 16-bit-values.
 </p></div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Dragos Buleandra (dragos.buleandra@trade2b.ro)</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.util.List</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#_list">_list</a></strong></code>
<div class="block">List of <tt>CellRangeAddress</tt>es.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#CellRangeAddressList()">CellRangeAddressList</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#CellRangeAddressList(int, int, int, int)">CellRangeAddressList</a></strong>(int&nbsp;firstRow,
                    int&nbsp;lastRow,
                    int&nbsp;firstCol,
                    int&nbsp;lastCol)</code>
<div class="block">Convenience constructor for creating a <tt>CellRangeAddressList</tt> with a single 
 <tt>CellRangeAddress</tt>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#CellRangeAddressList(org.apache.poi.hssf.record.RecordInputStream)">CellRangeAddressList</a></strong>(<a href="../../../../../org/apache/poi/hssf/record/RecordInputStream.html" title="class in org.apache.poi.hssf.record">RecordInputStream</a>&nbsp;in)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#addCellRangeAddress(org.apache.poi.ss.util.CellRangeAddress)">addCellRangeAddress</a></strong>(<a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;cra)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#addCellRangeAddress(int, int, int, int)">addCellRangeAddress</a></strong>(int&nbsp;firstRow,
                   int&nbsp;firstCol,
                   int&nbsp;lastRow,
                   int&nbsp;lastCol)</code>
<div class="block">Add a cell range structure.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html" title="class in org.apache.poi.ss.util">CellRangeAddressList</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#copy()">copy</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#countRanges()">countRanges</a></strong>()</code>
<div class="block">Get the number of following ADDR structures.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#getCellRangeAddress(int)">getCellRangeAddress</a></strong>(int&nbsp;index)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#getCellRangeAddresses()">getCellRangeAddresses</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#getEncodedSize(int)">getEncodedSize</a></strong>(int&nbsp;numberOfRanges)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#getSize()">getSize</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#remove(int)">remove</a></strong>(int&nbsp;rangeIndex)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#serialize(int, byte[])">serialize</a></strong>(int&nbsp;offset,
         byte[]&nbsp;data)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html#serialize(org.apache.poi.util.LittleEndianOutput)">serialize</a></strong>(<a href="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="_list">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>_list</h4>
<pre>protected final&nbsp;java.util.List _list</pre>
<div class="block">List of <tt>CellRangeAddress</tt>es. Each structure represents a cell range</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="CellRangeAddressList()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CellRangeAddressList</h4>
<pre>public&nbsp;CellRangeAddressList()</pre>
</li>
</ul>
<a name="CellRangeAddressList(int, int, int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CellRangeAddressList</h4>
<pre>public&nbsp;CellRangeAddressList(int&nbsp;firstRow,
                    int&nbsp;lastRow,
                    int&nbsp;firstCol,
                    int&nbsp;lastCol)</pre>
<div class="block">Convenience constructor for creating a <tt>CellRangeAddressList</tt> with a single 
 <tt>CellRangeAddress</tt>.  Other <tt>CellRangeAddress</tt>es may be added later.</div>
</li>
</ul>
<a name="CellRangeAddressList(org.apache.poi.hssf.record.RecordInputStream)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CellRangeAddressList</h4>
<pre>public&nbsp;CellRangeAddressList(<a href="../../../../../org/apache/poi/hssf/record/RecordInputStream.html" title="class in org.apache.poi.hssf.record">RecordInputStream</a>&nbsp;in)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - the RecordInputstream to read the record from</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="countRanges()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>countRanges</h4>
<pre>public&nbsp;int&nbsp;countRanges()</pre>
<div class="block">Get the number of following ADDR structures. The number of this
 structures is automatically set when reading an Excel file and/or
 increased when you manually add a new ADDR structure . This is the reason
 there isn't a set method for this field .</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>number of ADDR structures</dd></dl>
</li>
</ul>
<a name="addCellRangeAddress(int, int, int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addCellRangeAddress</h4>
<pre>public&nbsp;void&nbsp;addCellRangeAddress(int&nbsp;firstRow,
                       int&nbsp;firstCol,
                       int&nbsp;lastRow,
                       int&nbsp;lastCol)</pre>
<div class="block">Add a cell range structure.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>firstRow</code> - - the upper left hand corner's row</dd><dd><code>firstCol</code> - - the upper left hand corner's col</dd><dd><code>lastRow</code> - - the lower right hand corner's row</dd><dd><code>lastCol</code> - - the lower right hand corner's col</dd></dl>
</li>
</ul>
<a name="addCellRangeAddress(org.apache.poi.ss.util.CellRangeAddress)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addCellRangeAddress</h4>
<pre>public&nbsp;void&nbsp;addCellRangeAddress(<a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;cra)</pre>
</li>
</ul>
<a name="remove(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;remove(int&nbsp;rangeIndex)</pre>
</li>
</ul>
<a name="getCellRangeAddress(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCellRangeAddress</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>&nbsp;getCellRangeAddress(int&nbsp;index)</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd><tt>CellRangeAddress</tt> at the given index</dd></dl>
</li>
</ul>
<a name="getSize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSize</h4>
<pre>public&nbsp;int&nbsp;getSize()</pre>
</li>
</ul>
<a name="getEncodedSize(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncodedSize</h4>
<pre>public static&nbsp;int&nbsp;getEncodedSize(int&nbsp;numberOfRanges)</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the total size of for the specified number of ranges,
  including the initial 2 byte range count</dd></dl>
</li>
</ul>
<a name="serialize(int, byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serialize</h4>
<pre>public&nbsp;int&nbsp;serialize(int&nbsp;offset,
            byte[]&nbsp;data)</pre>
</li>
</ul>
<a name="serialize(org.apache.poi.util.LittleEndianOutput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serialize</h4>
<pre>public&nbsp;void&nbsp;serialize(<a href="../../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</pre>
</li>
</ul>
<a name="copy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/util/CellRangeAddressList.html" title="class in org.apache.poi.ss.util">CellRangeAddressList</a>&nbsp;copy()</pre>
</li>
</ul>
<a name="getCellRangeAddresses()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getCellRangeAddresses</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/util/CellRangeAddress.html" title="class in org.apache.poi.ss.util">CellRangeAddress</a>[]&nbsp;getCellRangeAddresses()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellRangeAddressList.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/ss/util/CellRangeAddressBase.html" title="class in org.apache.poi.ss.util"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/ss/util/CellReference.html" title="class in org.apache.poi.ss.util"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/ss/util/CellRangeAddressList.html" target="_top">FRAMES</a></li>
<li><a href="CellRangeAddressList.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
